package main

import (
	"encoding/json"
	"fmt"
)

// 定义JSON数据的结构体
type MyData struct {
	IDs []string `json:"ids"`
}

func main() {
	// 给定的JSON字符串
	jsonStr := "{\"ids\":[\"a5a75e51dc4dee08dbe0c08a8b780a3d\"]}"

	// 将字符串转换成[]uint8
	var uint8Slice []uint8
	for _, char := range jsonStr {
		uint8Slice = append(uint8Slice, uint8(char))
	}

	// 将[]uint8转换为[]byte
	dataBytes := uint8Slice

	// 解析JSON到结构体
	var data MyData
	if err := json.Unmarshal(dataBytes, &data); err != nil {
	}

	// 打印解析后的数据
	fmt.Printf("Received IDs: %+v\n", data.IDs)
}
